<template>
  <div class="goods">
    <img :src="src" alt="" />
    <div>
      <span>￥{{ price }}元</span>
      <span>预计收入{{ earnings }}元</span>
    </div>
  </div>
</template>

<script setup>
defineProps({
  src: {
    type: String,
    default: "",
  },
  price: {
    type: Number,
    default: 0,
  },
  earnings: {
    type: Number,
    default: 0,
  },
});
</script>

<style lang="less" scoped>
.goods {
  width: 208px;
  height: 256px;
  cursor: pointer;
  
  img {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }
  div {
    margin-top: 20px;
    display: flex;
    align-items: center;
    flex-direction: column;
    :first-child {
      font-weight: 600;
      font-size: 16px;
    }
  }
}



</style>
